<%--
  Created by IntelliJ IDEA.
  User: pc
  Date: 2024/6/28
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>新闻信息页面</title>
</head>
<body>
<br/><br/><br/>
    <div align="center">
        <table width="500" border="1" bordercolor="#f00" align="center">
            <tr>
                <th align="center">编号</th>
                <th align="center">标题</th>
                <th align="center">发布时间</th>
                <th align="center">发布人</th>
            </tr>

            <c:forEach items="${newsList}" var="news" varStatus="st">
            <tr>
                <td align="center">${news.nid}</td>
                <td align="center">${news.ntitle}</td>
                <td align="center">${news.ntime}</td>
                <td align="center">${news.uname}</td>
            </tr>
            </c:forEach>
            <tr>
                <td colspan="4" align="center"><a href="${pageContext.request.contextPath}/addnews">发布新闻</a></td>
            </tr>
        </table>
    </div>
</body>
</html>
